<template>
  <router-view v-slot="{ Component }">
    <transition name="fade" appear>
        <component :is="Component" />
    </transition>
  </router-view>
</template>
<script>
import { useRouter } from "vue-router";
import { ipcRenderer } from "electron";

export default {
  name: "App",
  setup() {
    let router = useRouter();
    ipcRenderer.on("initialedCompleted", () => {
      console.log("receive initialed")
      router.push({ name: "Home" ,replace:true});
    });
  },
};
</script>

<style>
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}
</style>
